 package com.bmps.springcloud.insuredmicroservice.model.accept.resquest;

 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.commons.lang3.builder.HashCodeBuilder;

 import javax.validation.Valid;
 import javax.validation.constraints.NotNull;
 import java.io.Serializable;

 /**
  *  @author lyw
  *  @date 2019/07/24
  */
 public class AcceptRequestDataModel implements Serializable {
     @Valid
     @NotNull(message="header节点不能为空!")
	 private RequestHeaderModel header;

     @Valid
     @NotNull(message="request节点不能为空!")
	 private RequestModel request;

     public RequestHeaderModel getHeader() {
         return header;
     }

     public void setHeader(RequestHeaderModel header) {
         this.header = header;
     }

     public RequestModel getRequest() {
         return request;
     }

     public void setRequest(RequestModel request) {
         this.request = request;
     }

     @Override
     public boolean equals(Object o) {
         if (this == o) {
             return true;
         }

         if (o == null || getClass() != o.getClass()) {
             return false;
         }

         AcceptRequestDataModel that = (AcceptRequestDataModel) o;

         return new EqualsBuilder()
                 .append(header, that.header)
                 .append(request, that.request)
                 .isEquals();
     }

     @Override
     public int hashCode() {
         return new HashCodeBuilder(17, 37)
                 .append(header)
                 .append(request)
                 .toHashCode();
     }

     @Override
     public String toString() {
         return "AcceptRequestDataModel{" +
                 "header=" + header +
                 ", request=" + request +
                 '}';
     }
 }
